//
//  NSAttributedString+Help.m
//  Stars
//
//  Created by Sunxb on 2017/9/6.
//  Copyright © 2017年 hst. All rights reserved.
//

#import "NSAttributedString+Help.h"

@implementation NSAttributedString (Help)

- (CGFloat)stringHeightWithMaxWidth:(CGFloat)maxWidth {
    
    return [self boundingRectWithSize:CGSizeMake(maxWidth, MAXFLOAT)
                              options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading
                              context:nil].size.height;
}

@end
